<template>
	<view class="productsVue">
		<view class="product-list-item" @click="addDistribution(info)">
			<image :src="info.banner" mode="aspectFill" class="product-list-item-img"></image>
			<view class="product-list-item-r">
				<view class="product-list-item-r-title">{{info.name || ''}}</view>
				<!-- <view class="product-list-item-r-guige">
					规格: 5杆/7套
				</view> -->
				<view class="product-list-item-r-price">
					
					<span style="margin-left: 0;">已售{{info.Sales || 0}}件</span>
				</view>
				<view class="product-list-item-r-btn">
					<view class="product-list-item-r-price" style="margin-bottom: 0;">
						￥{{info.price || ''}}
					</view>
					<view>
						<u-button type="error"  shape="circle" size="mini" text="买同款"></u-button>
					</view>
					
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['info','nickname'],
		data(){
			
		},
		methods:{
			addDistribution(it){
				uni.navigateTo({
					url:`/pagesA/shopping/detail?id=${it.id}&type=1&business_card_id=${it.business_card_id}&nickname=`+this.nickname
				})
			}
		}
	}
</script>

<style lang="scss">
	.productsVue {
		width: 100%;
		.product-list-item {
			width: 100%;
			display: flex;
			height: 210rpx;
			border-radius: 20rpx;
			background: #fff;
			box-shadow: 0rpx 0rpx 5rpx #555; 
			margin-bottom: 20rpx;
			.product-list-item-img {
				width: 280rpx;
				height: 210rpx;
				border-top-left-radius: 20rpx;
				border-bottom-left-radius: 20rpx;
				margin-right: 20rpx; 
			}
			.product-list-item-r {
				min-width: 0;
				flex: 1;
				box-sizing: border-box;
				padding: 20rpx;
				.product-list-item-r-title {
					font-size: 28rpx;
					font-weight: bold;
					margin-bottom: 20rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
				.product-list-item-r-guige {
					width: fit-content;
					background: #F8F8F8;
					padding: 1rpx 18rpx;
					border-radius: 5rpx;
					font-size: 28rpx;
					color: #A1A0A3;
					margin-bottom: 20rpx; 
				}
				.product-list-item-r-price {
					font-size: 36rpx;
					color: #E7373A;
					margin-bottom: 20rpx;
					span {
						margin-left: 20rpx;
						font-size: 24rpx;
						color: #828186;
					}
				}
				.product-list-item-r-num {
					display: flex;
					justify-content: space-between;
					font-size: 28rpx;
					margin-bottom: 20rpx;
				}
				.product-list-item-r-btn {
					display: flex;
					align-items: center;
					justify-content: space-between;
					box-sizing: border-box;
					
					&>view {
						width: 100rpx;
					}
				}
				
			}
		}
	}
</style>